package testiranjeSoftvera.GuiElements;

import java.awt.event.KeyEvent;

import javax.swing.JMenu;
import javax.swing.JMenuBar;

import testiranjeSoftvera.phage.PhageCore;

public class MenuBar extends JMenuBar {

	private static final long serialVersionUID = 1L;

	public MenuBar() {
		JMenu fileMenu = new JMenu("File");
		GameMenuItem startItem = new GameMenuItem("Start Game");
		startItem.addActionListener(PhageCore.getInstance().getAccManager()
				.getStartgameAction());
		fileMenu.add(startItem);
		GameMenuItem exitItem = new GameMenuItem("Exit");
		exitItem.addActionListener(PhageCore.getInstance().getAccManager().getExitPhage());
		fileMenu.add(exitItem);
		fileMenu.setMnemonic(KeyEvent.VK_F);
		add(fileMenu);

		JMenu editMenu = new JMenu("Edit");
		GameMenuItem editMenuItem = new GameMenuItem("Virus Editor");
		editMenuItem.addActionListener(PhageCore.getInstance().getAccManager()
				.getVedAction());
		editMenu.add(editMenuItem);
		editMenu.setMnemonic(KeyEvent.VK_E);
		add(editMenu);
		
		JMenu aboutMenu = new JMenu("About");
		GameMenuItem aboutItem = new GameMenuItem("About");
		aboutItem.addActionListener(PhageCore.getInstance().getAccManager().getAboutAction());
		aboutMenu.add(aboutItem);
		aboutMenu.setMnemonic(KeyEvent.VK_A);
		add(aboutMenu);
		

	}

}
